package com.zhentao.apis.schedule;

import com.zhentao.model.schedule.dto.TaskDto;
import com.zhentao.schedule.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Date 2024/3/6 14:33
 * @Author xdm
 **/
@FeignClient(name ="leadnews-schedule")
public interface ScheduleClientApi {
    @PostMapping("/api/v1/task/add")
    public ResponseResult addTask(@RequestBody TaskDto taskDto);


    //按照类型和优先级来拉取任务
    @GetMapping("/api/v1/task/poll/{type}/{priority}")
    public ResponseResult poll(@PathVariable("type") int type, @PathVariable("priority")  int priority);
}
